# ---------------------------------------------------------------------         
# Compiler selection                                                            
# ---------------------------------------------------------------------         

CCC = g++

# ---------------------------------------------------------------------         
# Compiler options                                                              
# ---------------------------------------------------------------------         

CCFLAGS = -m64 -O -fPIC -fexceptions -DIL_STD -g -Wall #-DNDEBUG

# ---------------------------------------------------------------------         
# Link options and libraries                                                    
# ---------------------------------------------------------------------         

CCLNFLAGS = -lm -pthread 

#------------------------------------------------------------                   
#  make all      : to compile the examples.                                     
#  make execute  : to compile and execute the examples.                         
#------------------------------------------------------------    

all: PI

PI: PI.o util.o 
	/bin/rm -f PI
	$(CCC) $(LINKFLAGS) $(CCFLAGS) PI.o util.o $(CCLNFLAGS) -o PI

PI.o: PI.cc PI.h
	/bin/rm -f PI.o
	$(CCC) $(CCFLAGS) PI.cc -c

util.o: util.cc PI.h
	/bin/rm -f util.o
	$(CCC) $(CCFLAGS) util.cc -c

clean:
	/bin/rm -f *~ *.o PI 
